#ifndef __KARBAZOL_DRAGNDROP_2_0__SHUTILS_H__
#define __KARBAZOL_DRAGNDROP_2_0__SHUTILS_H__

#include <shtypes.h>


HRESULT PathToIDList(unsigned int cp, LPCITEMIDLIST parent, const char* path, LPITEMIDLIST* pidl);
HRESULT ConsolePathToIDList(LPCITEMIDLIST parent, const char* path, LPITEMIDLIST* pidl);
void CopyMedium(STGMEDIUM& dest, const STGMEDIUM& src, CLIPFORMAT cf);

#define CFSTR_DRAGIMAGEBITS TEXT("DragImageBits")

#define DECLARE_CBD_FMT(x)  \
CLIPFORMAT get_##x()

DECLARE_CBD_FMT(DRAGCONTEXT);
#define CF_DRAGCONTEXT get_DRAGCONTEXT()

DECLARE_CBD_FMT(DRAGIMAGEBITS);
#define CF_DRAGIMAGEBITS get_DRAGIMAGEBITS()

DECLARE_CBD_FMT(LOGICALPERFORMEDDROPEFFECT);
#define CF_LOGICALPERFORMEDDROPEFFECT get_LOGICALPERFORMEDDROPEFFECT()

DECLARE_CBD_FMT(PREFERREDDROPEFFECT);
#define CF_PREFERREDDROPEFFECT get_PREFERREDDROPEFFECT()

DECLARE_CBD_FMT(PERFORMEDDROPEFFECT);
#define CF_PERFORMEDDROPEFFECT get_PERFORMEDDROPEFFECT()

DECLARE_CBD_FMT(PASTESUCCEEDED);
#define CF_PASTESUCCEEDED get_PASTESUCCEEDED()

DECLARE_CBD_FMT(TARGETCLSID);
#define CF_TARGETCLSID get_TARGETCLSID()

DECLARE_CBD_FMT(UNTRUSTEDDRAGDROP);
#define CF_UNTRUSTEDDRAGDROP get_UNTRUSTEDDRAGDROP()

DECLARE_CBD_FMT(FILEDESCRIPTORA);
#define CF_FILEDESCRIPTORA get_FILEDESCRIPTORA()

DECLARE_CBD_FMT(FILEDESCRIPTORW);
#define CF_FILEDESCRIPTORW get_FILEDESCRIPTORW()

DECLARE_CBD_FMT(FILECONTENTS);
#define CF_FILECONTENTS get_FILECONTENTS()

DECLARE_CBD_FMT(SHELLIDLIST);
#define CF_SHELLIDLIST get_SHELLIDLIST()

DECLARE_CBD_FMT(SHELLIDLISTOFFSET);
#define CF_SHELLIDLISTOFFSET get_SHELLIDLISTOFFSET()

DECLARE_CBD_FMT(INDRAGLOOP);
#define CF_INDRAGLOOP get_INDRAGLOOP()

#endif // __KARBAZOL_DRAGNDROP_2_0__SHUTILS_H__

